package io.renren.modules.app.request;

import io.renren.common.response.BaseRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 订单操作步骤上传请求
 * create by znr48268 on 2018/12/14
 */
@Data
@ApiModel("请求体")
public class UpdateStepReq extends BaseRequest {

    @ApiModelProperty(value = "订单号", example = "I1234567")
    String code;

    @ApiModelProperty(value = "订单类型", example = "0", notes = "0-入库,1-出库,2-盘库")
    OrderTypeEnum ordertype;

    @ApiModelProperty(value = "订单状态", example = "1", notes = "1-待操作,2-操作中,3-操作完成")
    Integer status;

    @ApiModelProperty(value = "工位号", example = "666")

    String station;

    @ApiModelProperty(value = "操作时间", example = "2018-12-19 00:00:00")
    Date optime;

    //    @ApiModelProperty(example = "[{'itemguid':'P12314123','truequantity':'15','proportion':'100','positioncode':'',}]")
    List<Item> positions;

    @Data
    public static class Item {
        //条码
        @ApiModelProperty(value = "条码", example = "WDS1123675HAHA")
        String itemguid;
        @ApiModelProperty(value = "实际数量", example = "15")
        double truequantity;
        @ApiModelProperty(value = "比例", example = "100")
        double proportion;
        @ApiModelProperty(value = "位置", example = "15")
        String positioncode;

    }

    public enum OrderTypeEnum {
        InOrder, OutOrder, CheckOrder;
    }
}
